[xen][tracing] Introduce variable-size trace records
authorGeorge Dunlap <gdunlap@xensource.com>
Fri, 21 Sep 2007 14:26:07 +0000 (15:26 +0100)
committerGeorge Dunlap <gdunlap@xensource.com>
Fri, 21 Sep 2007 14:26:07 +0000 (15:26 +0100)
commit2ec9f061dc68fc474238150bb1a21c5a882407b0
tree64f5bc7e4013ae20fc2af77b64b841245106e372
parent2aa818d3bb928b9c9cee965182b0e538748f2c41
[xen][tracing] Introduce variable-size trace records

This patch introduces variable-size trace records.  Each record consists of
a 32-bit "header", an optional cycle count, and up to seven more 32-bit words.

The header is packed with the following information:
 bits  0-27: The trace event.
 bits 28-30: The number of 32-bit "extra" words in the records
 bit     31: Does the trace include a 64-bit tsc?

This patch standardizes behavior wrt 32 and 64-bit hypervisors and dom0s.

Note that this patch requires a new version of the xentrace daemon running in
dom0.  The new daemon, instead of pre-pending the cpu to every record as it
writes it, inserts a "cpu change" record to the trace file that record the
cpu and the number of records it's about to write.

Signed-off-by: George Dunlap <gdunlap@xensource.com>
tools/xentrace/xentrace.c
xen/common/trace.c
xen/include/public/trace.h
xen/include/xen/trace.h